﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CDefineGlobal;
using System.Drawing;

namespace CObject
{
    public class MyTank : AbstractTank
    {
        public MyTank()
        {
            this.I_HP = 10;
            this.I_Life = 2;
            this.I_Type = 1;
            this.I_Speed = 5;
            this.I_ToMove = CDefine.DIRECTION_NONE;
            this.I_XMove = 0;
            this.I_YMove = 0;
            this.I_Direction = CDefine.DIRECTION_UP;

            this.Location = new Point(160, 480);

            this.BUp = new Bitmap("Pictures\\b1Up.bmp");
            this.BDown = new Bitmap("Pictures\\b1Down.bmp");
            this.BLeft = new Bitmap("Pictures\\b1Left.bmp");
            this.BRight = new Bitmap("Pictures\\b1Right.bmp");

            this.BUp = this.GetBitmapTransparent(BUp);
            this.BDown = this.GetBitmapTransparent(BDown);
            this.BLeft = this.GetBitmapTransparent(BLeft);
            this.BRight = this.GetBitmapTransparent(BRight);
            this.BCurrentBitmap = this.BUp;     //chỉ là khởi tạo thôi

            this.Rocket = new CNormalShot();
        }

        //Thực thi các phương thức
        public override void Fire()
        {
            this.Rocket.Fire(this.I_Direction, new Point(this.Location.X + 15, this.Location.Y + 15));// + 15 để đạn nằm giữa nòng tank (code cứng)
        }

        public override void CheckCollision()
        { }

        public override void ChangeBullet()
        { }

        public override void EatItem()
        { }
    }
}
